﻿<classes:MSHPhoneApplicationPage 
    x:Class="WP7Client.UserInterface.Pages.RegisterPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.WP7"
    xmlns:classes="clr-namespace:WP7Client.Classes"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True" Loaded="MSHPhoneApplicationPage_Loaded">
    <classes:MSHPhoneApplicationPage.Resources>
        <classes:BooleanToInvertedBooleanConverter x:Key="BooleanToInvertedBooleanConverter"/>
    </classes:MSHPhoneApplicationPage.Resources>

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <controls:Pivot Title="MY SOCIAL HUB" IsEnabled="{Binding Loading, Converter={StaticResource BooleanToInvertedBooleanConverter}}">
            <controls:PivotItem Header="Register">
                <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
                    <StackPanel Orientation="Vertical">
                        <TextBlock Text="Username:"/>
                        <TextBox Text="{Binding Path=Username, Mode=TwoWay}"/>
                        <TextBlock Text="Password:"/>
                        <PasswordBox Password="{Binding Path=Password, Mode=TwoWay}" />
                        <TextBlock Text="Confirm password:"/>
                        <PasswordBox Password="{Binding Path=Password2, Mode=TwoWay}" />
                        <TextBlock Text="Mobile phone number:"/>
                        <TextBlock Text="(incl. land code, e.g. +31612345678)"/>
                        <TextBox Text="{Binding Path=MobilePhoneNumber, Mode=TwoWay}" InputScope="TelephoneNumber"/>
                        <Button Content="Register new account" HorizontalAlignment="Left" cmd:ButtonBaseExtensions.Command="{Binding RegisterCommand}"/>
                    </StackPanel>
                </Grid>
            </controls:PivotItem>
        </controls:Pivot>
        <ProgressBar Name="ProgressBar" VerticalAlignment="Top" IsIndeterminate="{Binding Loading}"/>
    </Grid>

</classes:MSHPhoneApplicationPage>
